/*    */ package com.yss.sofa.cml.design;
/*    */ 
/*    */ import com.yss.sofa.cml.ColumnGroup;
/*    */ import com.yss.sofa.cml.ColumnGroupVisitor;
/*    */ import com.yss.sofa.cml.type.LayoutEnum;
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ 
/*    */ public class DesignColumnGroup
/*    */   implements ColumnGroup
/*    */ {
/*    */   private static final long serialVersionUID = 1L;
/*    */   protected List<DesignColumn> children;
/*    */ 
/*    */   public void addColumn(DesignColumn element)
/*    */   {
/* 18 */     if (this.children == null) {
/* 19 */       synchronized (this) {
/* 20 */         this.children = new ArrayList();
/*    */       }
/*    */     }
/* 23 */     this.children.add(element);
/*    */   }
/*    */ 
/*    */   public void addColumnWidth(int width, LayoutEnum layout) {
/* 27 */     addColumn(new DesignColumn(width, layout));
/*    */   }
/*    */ 
/*    */   public DesignColumn getColumn(int columnIndex)
/*    */   {
/* 32 */     return this.children == null ? null : (DesignColumn)this.children.get(columnIndex);
/*    */   }
/*    */ 
/*    */   public DesignColumn[] getColumns()
/*    */   {
/* 37 */     if (this.children == null) {
/* 38 */       return null;
/*    */     }
/* 40 */     DesignColumn[] arr = new DesignColumn[this.children.size()];
/* 41 */     this.children.toArray(arr);
/* 42 */     return arr;
/*    */   }
/*    */ 
/*    */   public <R> R visit(ColumnGroupVisitor<R> visitor)
/*    */   {
/* 47 */     return visitor.visitColumnGroup(this);
/*    */   }
/*    */ }

/* Location:           X:\repository\com\yss\sofa\cml\cml-api\1.1.0\cml-api-1.1.0.jar
 * Qualified Name:     com.yss.sofa.cml.design.DesignColumnGroup
 * JD-Core Version:    0.6.0
 */